<?php
/**
 * Description of User Asset Data
 *
 * @author Admin
 */
class Asset_Model_Userassetdata extends WOW_Model_Acl_Abstract
{
    public function getResourceId()
    {
        return 'Userassetdata';
    }

    public function getUserAssetDataByUserId($userid)
    {
        $temp_user_assetdata = $this->getResource('Userassetdata')->getUserAssetDataByUserId($userid);
        $user_assetdata = $temp_user_assetdata->toArray();
        return $user_assetdata;
    }


    #@ TODO:: needs to be worked on ACL later
    public function setAcl(WOW_Acl_Interface $acl)
    {
        if (!$acl->has($this->getResourceId()))
        {
            $acl->add($this)->allow('Normal', $this, array('register'))
            ->allow('Moderator', $this, array('saveCategory'))
                    ->allow('Admin', $this);
        }
        $this->_acl = $acl;
        return $this;
    }

    public function getAcl()
    {
        if (null === $this->_acl) {
            $this->setAcl(new Main_Model_Acl_Main());
        }
        return $this->_acl;
    }
    
}
?>

